function addPic(obj){
	var filename=obj.files[0].name;
	var imgsize = obj.files[0].size;
	if(imgsize>1024*1024*1){
		_letsun_show_msg("red","图片大小需要小于1M",3000);
		return false;
	}
	//上传开始
	$.ajaxFileUpload({
		url:$("#uppath").val(),	//处理图片脚本
		secureuri :false,
		fileElementId :'id-input-file',									//file控件id
		dataType : 'json',
		success : function (data){
			if(data.code==200)	{
				var url =data.result;
				//getView(num,url);
				$("#picurl").val(url);
				$("#uploadbutton").attr("data-title","重新上传");
				$("#filename").html(filename);
			}else{
				alert(data.msg);
			}
		},
		error: function(data){
			alert(data);
		}
	});
}
function addPrizePic(obj){
	var filename=obj.files[0].name;
	var imgsize = obj.files[0].size;
	if(imgsize>1024*1024*1){
		_letsun_show_msg("red","图片大小需要小于1M",3000);
		return false;
	}
	//上传开始
	$.ajaxFileUpload({
		url:$("#uppath").val(),	//处理图片脚本
		secureuri :false,
		fileElementId :'id-input-file1',									//file控件id
		dataType : 'json',
		success : function (data){
			if(data.code==200)	{
				var url =data.result;
				//getView(num,url);
				$("#prizepicurl").val(url);
				$("#uploadbutton1").attr("data-title","重新上传");
				$("#filename1").html(filename);
			}else{
				alert(data.msg);
			}
		},
		error: function(data){
			alert(data);
		}
	});
}

